# -*- coding : utf_8 -*-
'''
=======================================
Time : 2025/3/14 10:27
Author : 田霄汉
Email : 522989570@qq.com
File : conftest.py
Project : pytest_demo
=======================================
'''
import pytest

from utils.yaml_util import YamlUtil


@pytest.fixture()
def conn_database():
    print("连接数据库成功")
    yield
    print("关闭数据库成功")

@pytest.fixture(scope="session", autouse=False)
def clear_laohuangliresult(yaml_name="result_laohuangli.yml"):
    YamlUtil().clear_yaml(yaml_name=yaml_name)

@pytest.fixture(scope="session", autouse=False)
def clear_qqresult(yaml_name="result_qq.yml"):
    YamlUtil().clear_yaml(yaml_name=yaml_name)